import { VitePWA } from 'vite-plugin-pwa/dist';
import { getBrandColor } from '@/config/color';

export default function createPwa() {
  return VitePWA({
    base: './',
    manifest: {
      name: '自由开发',
      short_name: 'ZIOUYKAIFA',
      description: '自由开发网',
      display: 'standalone',
      background_color: '#ffffff',
      theme_color: '#0052D9',
      icons: [
        {
          src: './pwa_icons/192x192.png',
          sizes: '192x192',
          type: 'image/png',
        },
        {
          src: './pwa_icons/384x384.png',
          sizes: '384x384',
          type: 'image/png',
        },
      ],
    },
  });
}
